<?php

/**
 * TurmaAvaliacao form base class.
 *
 * @package    form
 * @subpackage turma_avaliacao
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseTurmaAvaliacaoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_turma_avaliacao'  => new sfWidgetFormInputHidden(),
      'dt_avaliacao'        => new sfWidgetFormDate(),
      'id_disciplina'       => new sfWidgetFormDoctrineChoice(array('model' => 'Disciplina', 'add_empty' => false)),
      'id_turma_ano_letivo' => new sfWidgetFormDoctrineChoice(array('model' => 'TurmaAnoLetivo', 'add_empty' => false)),
      'id_avaliacao'        => new sfWidgetFormDoctrineChoice(array('model' => 'Avaliacao', 'add_empty' => false)),
      'st_turma_avaliacao'  => new sfWidgetFormInput(),
      'created_at'          => new sfWidgetFormDateTime(),
      'updated_at'          => new sfWidgetFormDateTime(),
      'deleted'             => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id_turma_avaliacao'  => new sfValidatorDoctrineChoice(array('model' => 'TurmaAvaliacao', 'column' => 'id_turma_avaliacao', 'required' => false)),
      'dt_avaliacao'        => new sfValidatorDate(),
      'id_disciplina'       => new sfValidatorDoctrineChoice(array('model' => 'Disciplina')),
      'id_turma_ano_letivo' => new sfValidatorDoctrineChoice(array('model' => 'TurmaAnoLetivo')),
      'id_avaliacao'        => new sfValidatorDoctrineChoice(array('model' => 'Avaliacao')),
      'st_turma_avaliacao'  => new sfValidatorString(array('max_length' => 1)),
      'created_at'          => new sfValidatorDateTime(array('required' => false)),
      'updated_at'          => new sfValidatorDateTime(array('required' => false)),
      'deleted'             => new sfValidatorBoolean(),
    ));

    $this->widgetSchema->setNameFormat('turma_avaliacao[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'TurmaAvaliacao';
  }

}
